package com.example.javapracticaltraining.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.javapracticaltraining.entity.BaseData;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName nursing_record
 */
@TableName(value ="nursing_record")
@Data
public class NursingRecord implements BaseData {
    /**
     * 
     */
    @TableId(value = "nursing_id", type = IdType.AUTO)
    private Integer nursingId;

    /**
     * 
     */
    @TableField(value = "elderly_id")
    private Integer elderlyId;

    /**
     * 
     */
    @TableField(value = "nurse_id")
    private Integer nurseId;

    /**
     * 
     */
    @TableField(value = "record_time")
    private Date recordTime;

    /**
     * 
     */
    @TableField(value = "care_type")
    private String careType;

    /**
     * 
     */
    @TableField(value = "care_content")
    private String careContent;

    /**
     * 
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 
     */
    @TableField(value = "risk")
    private String risk;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NursingRecord other = (NursingRecord) that;
        return (this.getNursingId() == null ? other.getNursingId() == null : this.getNursingId().equals(other.getNursingId()))
            && (this.getElderlyId() == null ? other.getElderlyId() == null : this.getElderlyId().equals(other.getElderlyId()))
            && (this.getNurseId() == null ? other.getNurseId() == null : this.getNurseId().equals(other.getNurseId()))
            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
            && (this.getCareType() == null ? other.getCareType() == null : this.getCareType().equals(other.getCareType()))
            && (this.getCareContent() == null ? other.getCareContent() == null : this.getCareContent().equals(other.getCareContent()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getRisk() == null ? other.getRisk() == null : this.getRisk().equals(other.getRisk()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getNursingId() == null) ? 0 : getNursingId().hashCode());
        result = prime * result + ((getElderlyId() == null) ? 0 : getElderlyId().hashCode());
        result = prime * result + ((getNurseId() == null) ? 0 : getNurseId().hashCode());
        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
        result = prime * result + ((getCareType() == null) ? 0 : getCareType().hashCode());
        result = prime * result + ((getCareContent() == null) ? 0 : getCareContent().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getRisk() == null) ? 0 : getRisk().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", nursingId=").append(nursingId);
        sb.append(", elderlyId=").append(elderlyId);
        sb.append(", nurseId=").append(nurseId);
        sb.append(", recordTime=").append(recordTime);
        sb.append(", careType=").append(careType);
        sb.append(", careContent=").append(careContent);
        sb.append(", remark=").append(remark);
        sb.append(", risk=").append(risk);
        sb.append("]");
        return sb.toString();
    }
}